Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for passing pathlib.Path as a format to JSON schema #1879

Merged
merged 5 commits into from
Mar 16, 2024

Conversation

brandonsorensen
Copy link
Contributor

@brandonsorensen brandonsorensen commented Mar 8, 2024

I'm often in a situation where my models have attributes that refer logically to paths on the host machine. I wondered if there is any interest in incorporating the standard library's pathlib.Path class as a valid string format. I focused on JSON schema inputs, as they are my own primarily use case. As the changes are rather trivial, I drafted a quick implementation instead of opening a PR.

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@9535a16). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1879   +/-   ##
=======================================
  Coverage        ?   98.89%           
=======================================
  Files           ?       37           
  Lines           ?     4159           
  Branches        ?      968           
=======================================
  Hits            ?     4113           
  Misses          ?       29           
  Partials        ?       17           
Flag Coverage Δ
unittests 98.55% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Mar 8, 2024

CodSpeed Performance Report

Merging #1879 will not alter performance

Comparing brandonsorensen:pathlib-import (998f3cc) with main (9535a16)

Summary

✅ 29 untouched benchmarks

@koxudaxi koxudaxi marked this pull request as ready for review March 12, 2024 18:33
@koxudaxi
Copy link
Owner

@barreeeiroo
Thank you for creating the PR.
Looks good.
Could you please unittest for the feature?

@koxudaxi koxudaxi merged commit 33d6666 into koxudaxi:main Mar 16, 2024
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants